package cn.gdk.gaodekecc.feign;


import cn.gdk.gaodekecc.domain.MoveUser;
import cn.gdk.gaodekecc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class MoveTicketServiceFactory implements FallbackFactory<MoveTicketService> {
    @Override
    public MoveTicketService create(Throwable throwable) {
        return new MoveTicketService() {
            @Override
            public JSONResult list() {
                return JSONResult.error("该服务目前不可用");
            }

            @Override
            public JSONResult get(Long id) {
                return JSONResult.error("该服务目前不可用");
            }

            @Override
            public JSONResult buymovie(Long movieId, Integer count) {
                return JSONResult.error("该服务目前不可用");
            }

            @Override
            public JSONResult movieTicketViewing(Long movieId, Long userId) {
                return JSONResult.error("该服务目前不可用");
            }

            @Override
            public JSONResult saveOrUpdate(MoveUser moveUser) {
                return JSONResult.error("该服务目前不可用");
            }


        };
    }
}
